VPC_REGISTRY=registry-vpc.cn-shenzhen.aliyuncs.com
#VPC_REGISTRY=registry.cn-shenzhen.aliyuncs.com
REGISTRY=registry.cn-shenzhen.aliyuncs.com
NAMESPACE=sxf
NAME_FRM_CORE_TEST=ruoyi-admin

TAG=$(shell date +%Y%m%d%H%M)

#base:
#	mvn clean install

# 外网
public_sxf_ruoyi:
	${base}
	echo building "正在打公网地址包${NAME_FRM_CORE_TEST}镜像..."
	echo building ${NAME_FRM_CORE_TEST}:master
	cp ruoyi-admin/src/main/docker/Dockerfile .
	docker build -t ${REGISTRY}/${NAMESPACE}/${NAME_FRM_CORE_TEST}:master .
	docker tag ${REGISTRY}/${NAMESPACE}/${NAME_FRM_CORE_TEST}:master ${REGISTRY}/${NAMESPACE}/${NAME_FRM_CORE_TEST}:master
	rm Dockerfile
	docker push ${REGISTRY}/${NAMESPACE}/${NAME_FRM_CORE_TEST}:master

# 内网
sxf_ruoyi:
	${base}
	echo building "正在打内网地址包${NAME_FRM_CORE_TEST}镜像..."
	echo building ${NAME_FRM_CORE_TEST}:master
	cp ruoyi-admin/src/main/docker/Dockerfile .
	docker build -t ${VPC_REGISTRY}/${NAMESPACE}/${NAME_FRM_CORE_TEST}:master .
	docker tag ${VPC_REGISTRY}/${NAMESPACE}/${NAME_FRM_CORE_TEST}:master ${VPC_REGISTRY}/${NAMESPACE}/${NAME_FRM_CORE_TEST}:master
	rm Dockerfile
	docker push ${VPC_REGISTRY}/${NAMESPACE}/${NAME_FRM_CORE_TEST}:master
